<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<div id="app-1">
    <hanfeng v-for="item in items" v-bind:han="item"></hanfeng>
</div>


<script src="https://cdn.jsdelivr.net/npm/vue@2/dist/vue.js"></script>
<script type="text/javascript">
    //定义一个组件
    Vue.component("hanfeng",{
        props: ['han'],
        template: '<li>{{han}}</li>'
    });

    let app = new Vue({
        el: '#app-1',
        data: {
            items:['Java','Linux','前端']
        }
    })


</script>
</body>
</html>